import axios from '../../plugins/axios.js'

const state = {
	follow:[]
}

const actions = {
	follow({state,commit},{_limit,_page}={}){
		axios.get('/news/follow',{params:{_limit:_limit||20,_page:_page||1}})
		.then(
			res=>{
				commit('follow',res.data)
			}
		)
	}
}

const mutations = {
	follow:(state,payload)=>{
		state.follow = payload
	},
}	
export default {
	namespaced:true,
	state,actions,mutations
}